class CreateTransactors < ActiveRecord::Migration
  def self.up
    create_table :transactors do |t|
	  #common attributes
      t.string :name, :null => false
      t.string :street, :null => false
      t.string :city, :null => false
      t.string :postal_code, :null => false
      t.string :country, :null => false
	  
	  #contractor attributes
      t.string :phone_number
      t.string :nip
      t.string :regon
	  
	  #warehouse attributes
      t.float :area
	  
      t.string :type
      t.timestamps
    end
  end

  def self.down
    drop_table :transactors
  end
end
